import Vue from "vue";
import Vuex from "vuex";
import createPersisted from 'vuex-persistedstate';
import goods from "@/store/goods";
import cart from "@/store/cart";
import admin from "@/store/admin";
Vue.use(Vuex);

const store = new Vuex.Store({
	plugins:[
		// createPersisted()
		createPersisted({
			key:'sxx',
			paths:['goods','admin.token']
		})
	],
	state:{
		b:20
	},
	getters:{
		run(){
			return 100;
		}
	},
	modules:{
		goods,
		cart,
		admin
	}

});
export default store;